/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    color: #ecf0f1;
    padding: 2rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: 60px;
    & + .main-content {
        margin-left: 60px;
    }
}

.sidebar.collapsed .sidebar-header h3,
.sidebar.collapsed .sidebar-menu span,
.sidebar.collapsed .sidebar-footer span,
.sidebar.collapsed .control-item select,
.sidebar.collapsed .control-item span {
    display: none;
}

.sidebar.collapsed .sidebar-menu i {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 1rem 0.5rem;
}

.sidebar.collapsed .sidebar-footer-controls {
    align-items: center;
}

.sidebar.collapsed .control-item {
    justify-content: center;
    padding: 0.5rem;
    width: 100%;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar.collapsed .control-item:hover {
    background: rgba(52, 152, 219, 0.1);
}

.sidebar.collapsed .theme-switch {
    margin: 0;
}

/* Sidebar toggle button */
.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 20px;
    width: 24px;
    height: 24px;
    background: #3498db;
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.sidebar-toggle:hover {
    background: #2980b9;
    transform: scale(1.1);
}

/* Sidebar footer */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ecf0f1;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.control-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.control-item.dark-mode-control i {
    transition: transform 0.3s ease;
}

.control-item.dark-mode-control.dark i {
    transform: rotate(180deg);
    color: #f1c40f;
}

.control-item select {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
    padding: 0.3rem;
    border-radius: 4px;
}

.control-item select option {
    background: #2c3e50;
    color: #ecf0f1;
}

/* Main content area */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.expanded {
    margin-left: 60px;
}

/* Modal sizes */
.modal-xl {
    max-width: 1200px;
}

/* Dark theme */
body.dark-theme {
    background-color: #121212;
    color: #ecf0f1;
}

.dark-theme .card,
.dark-theme .modal-content,
.dark-theme .workflow-card {
    background: #1e1e1e;
    border-color: #404040;
    color: #ecf0f1;
}

.dark-theme .card-header,
.dark-theme .modal-header,
.dark-theme .modal-footer {
    background: #252525;
    border-color: #404040;
    color: #ecf0f1;
}

.dark-theme .form-control,
.dark-theme .form-select {
    background: #2d2d2d;
    border-color: #404040;
    color: #ecf0f1;
}

.dark-theme .form-label,
.dark-theme .modal-title,
.dark-theme .workflow-card-title,
.dark-theme .stat-value,
.dark-theme .stat-label,
.dark-theme .settings-section h4 {
    color: #ecf0f1;
}

.dark-theme .text-muted {
    color: #a0a0a0 !important;
}

.dark-theme .form-check-label {
    color: #ecf0f1;
}

/* Dark theme buttons */
.dark-theme .btn-outline-primary {
    color: #3498db;
    border-color: #3498db;
}

.dark-theme .btn-outline-primary:hover {
    background: #3498db;
    color: #ecf0f1;
}

.dark-theme .btn-outline-info {
    color: #2ecc71;
    border-color: #2ecc71;
}

.dark-theme .btn-outline-info:hover {
    background: #2ecc71;
    color: #ecf0f1;
}

.dark-theme .btn-outline-danger {
    color: #e74c3c;
    border-color: #e74c3c;
}

.dark-theme .btn-outline-danger:hover {
    background: #e74c3c;
    color: #ecf0f1;
}

.dark-theme .btn-secondary {
    background: #34495e;
    border-color: #2c3e50;
    color: #ecf0f1;
}

.dark-theme .btn-secondary:hover {
    background: #2c3e50;
    border-color: #233140;
}

.dark-theme .sidebar {
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
}

.dark-theme .sidebar-menu i {
    color: #3498db;
}

.dark-theme .sidebar-menu li:hover {
    background: rgba(52, 152, 219, 0.05);
}

.dark-theme .sidebar-menu li.active {
    background: rgba(52, 152, 219, 0.1);
}

.dark-theme .stat-item {
    background: #252525;
    border: 1px solid #404040;
}

/* Cards and components */
.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

/* Enhanced Workflow Management Styles */
.workflow-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: linear-gradient(135deg, #f6f8fa 0%, #f1f4f6 100%);
    border-radius: 20px;
    overflow: hidden;
}

.workflow-header {
    text-align: center;
    margin-bottom: 2rem;
}

.workflow-header h3 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.workflow-header p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.workflow-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workflow-step {
    position: absolute;
    width: 140px;
    height: 140px;
    background: white;
    border-radius: 50%;
    display: grid;
    grid-template-rows: auto auto auto;
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.workflow-step:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.workflow-step.reasoning {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.workflow-step.execution {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.step-content {
    text-align: center;
    color: white;
}

.step-number {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 0.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.step-type {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.step-model {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workflow-connector {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3));
    transform-origin: left center;
    pointer-events: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Workflow Cards */
.workflow-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

.workflow-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.workflow-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(to right, #f8f9fa, #ffffff);
}

.workflow-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.workflow-card-body {
    padding: 1.5rem;
}

.workflow-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Switch styling */
.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    margin-top: 0.2em;
}

.form-switch .form-check-input:checked {
    background-color: #2ecc71;
    border-color: #27ae60;
}

/* Action buttons */
.workflow-actions {
    display: flex;
    gap: 0.5rem;
}

.workflow-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.workflow-actions .btn i {
    font-size: 1rem;
}

/* Add New Workflow button */
.add-workflow-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    color: #ffffff;
}

.add-workflow-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2472a4 100%);
    transform: translateY(-2px);
    color: #ffffff;
}

.add-workflow-btn i {
    margin-right: 0.5rem;
}

/* Buttons and forms */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    border: none;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.8rem;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Settings panel */
.settings-panel {
    max-width: 800px;
    margin: 0 auto;
}

.settings-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.settings-section h4 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.navbar {
    margin-bottom: 2rem;
}

.card-body {
    padding: 1rem;
}

.btn-sm {
    margin-right: 0.5rem;
}

/* Workflow visualization modal */
#workflowVisualizationModal .modal-content {
    background: linear-gradient(135deg, #f6f8fa 0%, #f1f4f6 100%);
}

#workflowVisualizationModal .modal-body {
    min-height: 600px;
}

/* Preview button */
.preview-btn {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.preview-btn:hover {
    transform: scale(1.1);
    background: #2980b9;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.preview-btn i {
    font-size: 1.2rem;
}

/* Sidebar header */
.sidebar-header {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    padding: 0.8rem 1.5rem;
    margin: 0.2rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.sidebar-menu li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #3498db;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-menu li:hover::before {
    transform: scaleY(1);
}

.sidebar-menu li.active {
    background: rgba(52, 152, 219, 0.1);
}

.sidebar-menu li.active::before {
    transform: scaleY(1);
}

.sidebar-menu i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: #3498db;
}

/* Dark theme workflow visualization */
.dark-theme .workflow-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
}

.dark-theme .workflow-circle {
    border-color: rgba(52, 152, 219, 0.15);
    box-shadow: inset 0 0 50px rgba(52, 152, 219, 0.05);
}

.dark-theme .workflow-step {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dark-theme .workflow-step:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.dark-theme .workflow-connector {
    background: linear-gradient(90deg, 
        rgba(52, 152, 219, 0.3),
        rgba(52, 152, 219, 0.8),
        rgba(52, 152, 219, 0.3)
    );
}

/* Dark theme form elements */
.dark-theme .form-control:focus,
.dark-theme .form-select:focus {
    background: #2d2d2d;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.dark-theme .form-control::placeholder {
    color: #808080;
}

.dark-theme .form-control:disabled,
.dark-theme .form-select:disabled {
    background: #1a1a1a;
    color: #808080;
}

/* Dark theme modal improvements */
.dark-theme .modal-content {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.dark-theme .modal-header,
.dark-theme .modal-footer {
    border-color: #404040;
}

/* Dark theme table improvements */
.dark-theme table {
    color: #ecf0f1;
}

.dark-theme .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

/* Dark theme scrollbar */
.dark-theme ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dark-theme ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 5px;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #505050;
}

/* Dark theme improvements */
.dark-theme .workflow-card {
    background: #1e1e1e;
    border-color: #404040;
    color: #ecf0f1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.dark-theme .workflow-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.dark-theme .workflow-card-header {
    background: linear-gradient(to right, #1a1a1a, #1e1e1e);
    border-bottom: 1px solid #404040;
}

.dark-theme .workflow-stats {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 1rem;
}

.dark-theme .stat-item {
    background: #252525;
    border: 1px solid #404040;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-theme .stat-value {
    color: #ecf0f1;
}

.dark-theme .stat-label {
    color: #a0a0a0;
}

/* Dark theme switch styling */
.dark-theme .form-switch .form-check-input {
    background-color: #404040;
    border-color: #505050;
}

.dark-theme .form-switch .form-check-input:checked {
    background-color: #2ecc71;
    border-color: #27ae60;
}

/* Dark theme workflow actions */
.dark-theme .workflow-actions {
    border-top: 1px solid #404040;
    padding-top: 1rem;
    margin-top: 1rem;
}

.dark-theme .preview-btn {
    background: #2980b9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dark-theme .preview-btn:hover {
    background: #3498db;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Dark theme status badge */
.dark-theme .status-badge {
    background: #252525;
    border: 1px solid #404040;
    color: #ecf0f1;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.dark-theme .status-badge.active {
    background: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
    color: #2ecc71;
}

.dark-theme .status-badge.inactive {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #e74c3c;
}

/* Language selector in collapsed state */
.sidebar.collapsed .control-item.language-control {
    position: relative;
}

.sidebar.collapsed .control-item.language-control:hover .language-popup {
    display: block;
}

.language-popup {
    display: none;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #2c3e50;
    border-radius: 8px;
    padding: 0.5rem;
    margin-left: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.language-popup::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent #2c3e50 transparent transparent;
}

.language-popup select {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
    padding: 0.3rem;
    border-radius: 4px;
    width: 120px;
}

/* Dark theme adjustments for collapsed sidebar */
.dark-theme .sidebar.collapsed .control-item:hover {
    background: rgba(52, 152, 219, 0.05);
}

.dark-theme .sidebar.collapsed {
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
}

.dark-theme .sidebar-toggle {
    background: #2980b9;
    color: #ecf0f1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.dark-theme .sidebar-toggle:hover {
    background: #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.dark-theme .language-popup {
    background: #1e1e1e;
    border: 1px solid #404040;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Settings styles */
.settings-container {
    display: flex;
    gap: 2rem;
    height: calc(100vh - 4rem);
}

.settings-sidebar {
    width: 250px;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-nav-item:hover {
    background: rgba(52, 152, 219, 0.1);
}

.settings-nav-item.active {
    background: #3498db;
    color: white;
}

.settings-nav-item i {
    width: 20px;
    text-align: center;
}

.settings-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.api-keys-list {
    display: grid;
    gap: 1rem;
}

.api-key-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.api-key-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.api-key-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.api-key-provider {
    font-weight: 600;
    color: #2c3e50;
}

.api-key-description {
    font-size: 0.875rem;
    color: #7f8c8d;
}

.api-key-actions {
    display: flex;
    gap: 0.5rem;
}

/* Dark theme adjustments for settings */
.dark-theme .settings-sidebar,
.dark-theme .settings-content {
    background: #202020;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-theme .settings-nav-item {
    color: #ecf0f1;
}

.dark-theme .settings-nav-item:hover {
    background: rgba(52, 152, 219, 0.05);
}

.dark-theme .settings-nav-item.active {
    background: #3498db;
    color: white;
}

.dark-theme .section-header h3 {
    color: #ecf0f1;
}

/* Dark theme for credentials form */
.dark-theme .credentials-form {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #333;
}

.dark-theme .credentials-form h4 {
    color: #ecf0f1;
    margin-bottom: 1.5rem;
}

.dark-theme .form-label {
    color: #bdc3c7;
}

.dark-theme .form-control {
    background: #252525;
    border-color: #444;
    color: #ecf0f1;
}

.dark-theme .form-control:focus {
    background: #2d2d2d;
    border-color: #3498db;
    color: #ecf0f1;
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.dark-theme .form-control::placeholder {
    color: #777;
}

/* Dark theme for API keys */
.dark-theme .api-key-item {
    background: #1a1a1a;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.dark-theme .api-key-item:hover {
    background: #202020;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.dark-theme .api-key-value {
    color: #ecf0f1;
    font-weight: 500;
}

.dark-theme .api-key-description {
    color: #bdc3c7;
}

.dark-theme .api-key-actions {
    display: flex;
    gap: 0.5rem;
}

/* Dark theme for modals */
.dark-theme .modal-content {
    background: #1e1e1e;
    border: 1px solid #333;
}

.dark-theme .modal-header {
    border-bottom-color: #333;
}

.dark-theme .modal-footer {
    border-top-color: #333;
}

.dark-theme .modal-title {
    color: #ecf0f1;
}

.dark-theme .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Dark theme for alerts */
.dark-theme .alert-info {
    background: #2c3e50;
    border-color: #34495e;
    color: #ecf0f1;
}

.dark-theme .alert-danger {
    background: #c0392b;
    border-color: #e74c3c;
    color: #ecf0f1;
}

.dark-theme .alert-success {
    background: #27ae60;
    border-color: #2ecc71;
    color: #ecf0f1;
}

/* Dark theme for buttons in settings */
.dark-theme .settings-content .btn-primary {
    background: #3498db;
    border: none;
}

.dark-theme .settings-content .btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.dark-theme .settings-content .btn-secondary {
    background: #34495e;
    border: none;
}

.dark-theme .settings-content .btn-secondary:hover {
    background: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Dark theme for section headers */
.dark-theme .section-header {
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.dark-theme .section-header h3 {
    color: #ecf0f1;
    font-weight: 500;
}

/* Dark theme for settings pages */
.dark-theme .settings-section {
    background: #202020;
    color: #ecf0f1;
}

.logout-control {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-control:hover {
    background-color: var(--hover-bg-color);
}

.logout-control i {
    font-size: 16px;
    color: var(--text-color);
}

.dark-theme .logout-control i {
    color: var(--dark-text-color);
}

.logout-control span {
    color: var(--text-color);
}

.dark-theme .logout-control span {
    color: var(--dark-text-color);
}

/* Active/Inactive switch styling */
.workflow-status-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dark-theme .workflow-status-switch {
    background: rgba(255, 255, 255, 0.05);
}

.form-switch.workflow-switch {
    margin: 0;
    padding-left: 2.5em;
}

.form-switch.workflow-switch .form-check-input {
    width: 2.5em;
    height: 1.25em;
    margin-left: -2.5em;
    background-color: #dc3545;
    border-color: #dc3545;
    cursor: pointer;
    box-shadow: none;
}

.form-switch.workflow-switch .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

.form-switch.workflow-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.workflow-status-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    transition: color 0.3s ease;
}

.dark-theme .workflow-status-label {
    color: #adb5bd;
}

.workflow-status-switch.active .workflow-status-label {
    color: #198754;
}

.workflow-status-switch.inactive .workflow-status-label {
    color: #dc3545;
}

.dark-theme .workflow-status-switch.active .workflow-status-label {
    color: #2ecc71;
}

.dark-theme .workflow-status-switch.inactive .workflow-status-label {
    color: #e74c3c;
}

/* 添加到现有的 CSS 文件中 */
.emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.sidebar-header h3 {
    font-family: 'Inter', "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.model-details {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.tool-config, .thinking-config {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    background-color: rgba(0,0,0,0.03);
}

.tool-config.active, .thinking-config.active {
    background-color: rgba(0,255,0,0.03);
}

.tools-detail {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: rgba(0,0,0,0.02);
    border-radius: 4px;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.8rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
}